let fs = require('fs');
let buf = '';

process.stdin.on('readable', function() {
    let chunk = process.stdin.read();
    if (chunk) buf += chunk.toString();
});

let print2D = (a, row, col) => {
    for (let i = 0; i < row; ++i) {
        let s = "";
        for (let j = 0; j < col; ++j) {
            s += `${a[i][j]} `;
        }
        console.log(s);
    }
}

process.stdin.on('end', function() {
    let input = buf.split("\n");
    let [n, m] = input[0].split(" ").map((x)=>{return parseInt(x);});
    let a = [];
    for (let i = 0; i < n; ++i) {
        a.push(input[i + 1].split(" ").map((x)=>{return parseInt(x);}));
    }
    print2D(a, n, m);
});